<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/share/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>详情</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ include file="/WEB-INF/share/easyuilist.jsp"%>
<style>
.ui-underline .ui-select-text {
	border: 1px solid #ccc !important;
}
</style>
<script type="text/javascript">
	var saveUrl = '${ctx}/special/save';
	var keyValue = request('id');
	$(function() {
		$('#drivertype').ComboBox({
			description : "==请选择==",
			isuse : true
		})
		$('#subtype').ComboBox({
			description : "==请选择==",
			isuse : true
		})
		
		var drivertype = '${chapter.drivertype}';
		var subtype = '${chapter.subtype}';
		if(drivertype)$('#drivertype').ComboBoxSetValue(drivertype);
		if(subtype)$('#subtype').ComboBoxSetValue(subtype);
	})
	//保存表单
	function AcceptClick() {
		if (!$('#form1').Validform()) {
			return false;
		}
		var postData = $('#form1').serialize();
		var drivertype = $('#drivertype').attr('data-value');
		var subtype = $('#subtype').attr('data-value');
		postData+='&drivertype='+drivertype+'&subtype='+subtype;
		$.SaveForm({
			url : saveUrl,
			param : postData,
			loading : "正在保存数据...",
			success : function(data) {
				$.currentIframe().$("#gridTable").trigger("reloadGrid");
			}
		})
	}
</script>
</head>
<body>
	<form id="form1">
		<input id="id" name="id" value="${chapter.id}" type="hidden" />
		<div style="margin-left: 10px; margin-right: 10px;">
			<div id="BaseInfo" class="tab-pane active"
				style="padding-right: 30px;">
				<table class="form">
					<tr>
						<td class="formTitle">名称<font face="宋体">*</font></td>
						<td class="formValue">
							<input id="name" name="name" isvalid="yes" value="${chapter.name}" type="text" class="form-control" checkexpession="NotNull"/>
						</td>
					</tr>
					<tr>
						<td class="formTitle">题目类型<font face="宋体">*</font></td>
						<td class="formValue">
							<div id="drivertype" type="select" class="ui-select ui-underline" isvalid="yes" checkexpession="NotNull">
								<ul>
									<c:forEach items="${CarTypeList}" var="entry">
										<li data-value="${entry.value}">${entry.value}</li>
									</c:forEach>
								</ul>
							</div>
						</td>
					</tr>
					<tr>
						<td class="formTitle">科目类型<font face="宋体">*</font></td>
						<td class="formValue">
							<div id="subtype" type="select" class="ui-select ui-underline" isvalid="yes" checkexpession="NotNull">
								<ul>
									<li data-value="科目一">科目一</li>
									<li data-value="科目四">科目四</li>
								</ul>
							</div>
						</td>
					</tr>
					<tr id="spancollectionmoney">
						<td class="formTitle">排序<font face="宋体">*</font></td>
						<td class="formValue">
							<input id="xorder" style=""
								name="xorder" value="${chapter.xorder}" type="text"
								class="form-control" placeholder="请输入排序" isvalid="yes" checkexpession="Num"/>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</form>
</body>
</html>
